import 'package:flutter/gestures.dart';
import 'package:flutter/material.dart';
import 'package:flutter_html/flutter_html.dart';
import 'package:whale/helper/utils/util.dart';
import 'package:whale/pages/means/subs/means_detail/index.dart';

import '../../../../../helper/component/component.dart';

class MeansDetailNotiView extends GetView<MeansDetailController> {
  const MeansDetailNotiView({
    Key? key,
    required this.data,
  }) : super(key: key);
  final String data;
  @override
  Widget build(BuildContext context) {
    return GetBuilder<MeansDetailController>(builder: (_) {
      return data.isEmpty
          ? SingleChildScrollView(
              child: noDataView(
                title: '无问题建议函',
              ),
            )
          : Container(
              child: SingleChildScrollView(
                child: Html(
                  shrinkWrap: true,
                  data: data,
                ),
              ),
            );
    });
  }
}
